<?php
/**
 * interface for html controls
 */
interface fily_ControlToHtml {
    /**
     * should return the html code
     */
    public function toHtml();
    /**
     * should prepare the control for the html output
     */
    public function prepare();
    /**
     * shortcut for toHtml()
     */
    public function __toString();
    /**
     * returns the id from this control
     * @return string
     */
    public function getId();
    /**
     * finds a control with the specific id
     * @param string $sid
     * @return fily_ControlToHtml
     */
    public function getControlById($sid);

    /**
     * returns the sid from this control
     */
    public function getSid();
    /**
     * finds a control with the specific system id
     * @param string $id
     * @return fily_ControlToHtml
     */
    public function getControlBySid($sid);


    /**
     * finds a control in the tree
     * @param <type> $expression
     * @return fily_ControlToHtml
     */
    public function find($expression);
}
?>